<template>
  <div class="bootPage" @click="closeBootPage">
	<p>{{live.guideTime}}s进入</p>
	<img :src="(live.guidePic==''||live.guidePic==null)?defaultCover:live.guidePic" frameborder="0" />
  </div>
</template>
<!-- guideTime -->
<script>
  export default {
		data() {
		  return {
			// timeNum:5, 
			defaultCover: require("../../static/img/guideBg.png"),
		  };
		},
		computed: {
			live() {
				return this.$store.state.liveInfo;
			}
		},
    methods: {
      closeBootPage(){
		this.$store.state.bootPageShow=false
		this.$store.state.directPageShow=true
      }
    },
		created() {
		  this.timer=setInterval(()=>{
			//   this.timeNum--
			  this.live.guideTime--;
		      if(this.live.guideTime==0){
		        clearInterval(this.timer)
				this.$store.state.bootPageShow=false
				this.$store.state.directPageShow=true
		      }
		    },1000)
		}
  }
</script>

<style lang="less" rel="stylesheet/less" scoped>
 .bootPage {
   width: 100%;
   height: 100%;
   z-index: 2000;
	 position: fixed;
	 top: 0;
	 left: 0;
	 p {
		 position: absolute ;
		 top: 5px;
		 right: 5px;
		 background:rgba(0, 0, 0, 0.6);
		 padding: 5px 10px;
		 color: #fff;
		 border-radius: 30px;
		 font-size: 14px;
	 }
	 img{
		 width: 100%;
		 max-height: 100%;
	 }
 }
</style>
